#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Enhanced MCP Calculator Server Startup Script"""

import sys
import os
from pathlib import Path

# 添加项目根目录到Python路径
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))

# 设置工作目录
os.chdir(project_root)

if __name__ == "__main__":
    try:
        from src.main_enhanced import main
        main()
    except KeyboardInterrupt:
        print("\n服务器已停止")
    except Exception as e:
        print(f"启动失败: {e}")
        sys.exit(1)
